﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;
using System.ComponentModel;

namespace WpfMvvmTest
{
    class ProductViewModel 
    {
        private IList<ProductListTable> m_Products;
        public ProductViewModel()
        {
			m_Products = new List<ProductListTable>
            {
				//new Product {ID=1, Name ="Pro1", Price=10},
				//new Product{ID=2, Name="BAse2", Price=12}
            };
        }

		public IList<ProductListTable> Products
        {
            get
            {
                return m_Products;
            }
            set
            {
                m_Products = value;
            }
        //}

        //private ICommand mUpdater;
        //public ICommand UpdateCommand
        //{
        //    get
        //    {
        //        if (mUpdater == null)
        //            mUpdater = new Updater();
        //        return mUpdater;
        //    }
        //    set
        //    {
        //        mUpdater = value;
        //    }
        //}

        //private class Updater : ICommand
        //{
        //    #region ICommand Members

        //    public bool CanExecute(object parameter)
        //    {
        //        return true;
        //    }

        //    public event EventHandler CanExecuteChanged;

        //    public void Execute(object parameter)
        //    {

        //    }

        //    private ICommand mCreater;
        //    public ICommand CreateCommand
        //    {
        //        get
        //        {
        //            mCreater = new Creater();
        //            return mCreater;
        //        }
        //        set
        //        {
        //            mCreater = value;
        //        }
        //    }


        //    #endregion
        //}

        //private class Creater : ICommand
        //{
        //    public bool CanExecute(object parameter)
        //    {
        //        return true;
        //    }

        //    public event EventHandler CanExecuteChanged;

        //    public void Execute(object parameter)
        //    {

        //    }
		}





	}


}
